<!DOCTYPE html>
<html>
    <head><title>Cadastro de Carros</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="css/default.css">
        <link rel="stylesheet" type="text/css" href="css/menu.css">
        <link rel="stylesheet" type="text/css" href="css/newCar.css">
        <title></title>
    </head>
    <body>
        <div id="container">
            <div id="title">
                <div id="img">
                <img src="css/ico_car.png"/>
                </div>
                <div id="h1">
                <h1>Park Control</h1>
                </div>
            </div>
            <div id="menu">
                <ul class="menu">
                    <li><a href="#" title="Cadastros">Cadastros</a>
                        <ul>
                            <li><a href="newCli.php" target="_parent" >Cadastrar Cliente</a></li>
                            <li><a href="newCar.php" target="_parent">Cadastrar Carro</a></li>
                            <li><a href="newFares.php" target="_parent">Cadastrar Tarifas</a></li>
                        </ul>
                    </li>
                    <li><a href="#" title="Gerenciar">Gerenciar</a>
                        <ul>
                            <li><a href="newPark.php" target="_parent">Entrada de Carros</a></li>
                            <li><a href="relExitPark.php" target="_parent">Saida de Carros</a></li>
                        </ul>
                    </li>
                    <li><a href="#" title="Relatorios">Relatorios</a>
                        <ul>
                            <li><a href="relCar.php" target="_parent">Relatório de Carros</a></li>
                            <li><a href="relCli.php" target="_parent">Relatório de Clientes</a></li>
                            <li><a href="relPark.php" target="_parent">Relatório de Entradas</a></li>    
                        </ul>
                    </li>
                </ul>
            </div>




            <form method="POST" action="action/InsertCar.action.php" name="newCarForm" id="newCarForm"/>
            <div id="span"> 
                <span id="newCarError" class="error"><h2>Cadastro de Carros</h2></span>
            </div>
            <?php include 'action/EditCar.action.php' ?>
            <div id="cardata">    
                <fieldset>
                    <label id="carModelLabel">
                        Modelo:
                        <input type="hidden" id="idCar" name="idCar" value="<?php echo $car->getId(); ?>"/>
                        <input type="text" id="carModelInput" name="carModelInput" value="<?php echo $car->getModel(); ?>" onChange="javascript:this.value=this.value.toUpperCase();"/>
                    </label>

                    <label id="carMarkLabel">
                        Marca:
                        <input type="text" id="carMarkInput" name="carMarkInput" value="<?php echo $car->getMark(); ?>" onChange="javascript:this.value=this.value.toUpperCase();"/>
                    </label>

                    <label id="carColorLabel">
                        Cor:
                        <input type="text" id="carColorInput" name="carColorInput" value="<?php echo $car->getColor(); ?>" onChange="javascript:this.value=this.value.toUpperCase();"/>
                    </label>

                    <label id="carLicenseLabel">
                        Placa:
                        <input type="text" id="carLicenseInput" name="carLicenseInput"  value="<?php echo $car->getPlaque(); ?>" onChange="javascript:this.value=this.value.toUpperCase();"/>
                    </label>

                    <label id="carYearLabel">
                        Ano:
                        <input type="text" id="carYearInput" name="carYearInput"  value="<?php echo $car->getYear(); ?>" onChange="javascript:this.value=this.value.toUpperCase();"/>
                    </label> 
            </div>

            <div id="buttons">
                <input type="button" id="carOkButton" value = "Cadastrar" />
                <input type="reset" id="carResetButton" value = "Limpar" />
            </div>              
        </form>
    </div>  
</fieldset>
<script type="text/javascript" src="js/mask.js"></script>
<script type="text/javascript" src="js/libs/MaskedInput/MaskedInput.js"></script>
<script type="text/javascript" src="js/validation.js"></script>
<script type="text/javascript" src="js/newCar.js"></script>
</body>
</html>
